<template>
	<view class="search-wrap px24py30">
		<view>
			<bg-title>
				<text class="font-14 font-normal">选择要查询的项目</text>
			</bg-title>
			<view>
				<!-- <bg-cell2 :label="label">
					<template slot="value">
						
					</template>
				</bg-cell2> -->
				<view class="flex my-4">
					<view>{{label}}</view>
					<view class="flex-1">
						<u--input @clear="clear" clearable placeholder="请输入" inputAlign='right' border="none" v-model="keyword"></u--input>
					</view>
				</view>
			</view>
			<view>
				<bg-btn @click="search">查询</bg-btn>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"bg-search2",
		props:{
			title:{
				default:'选择要查询的项目'
			},
			label:{
				default:"字段名称"
			}
		},
		data() {
			return {
				keyword:''
			};
		},
		methods:{
			search(){
				this.$emit("search", this.keyword)
				// if(this.keyword){
					
				// } else {
				// 	this.$modal.msg("请输入要查询的内容")
				// }
			},
			clear(){
				this.$emit("search", '')
			},
		}
		
	}
</script>

<style scoped>
.search-wrap {
	background: #ffffff;
	box-sizing: border-box;
	border-radius: 16rpx;
	font-size: 28rpx;
}
</style>